[Fix][RayJob SidecarMode] Prevent premature job termination during transient head node spikes#4399
Open
justinyeh1995 wants to merge 9 commits intoray-project:masterfrom
Conversation
Signed-off-by: justinyeh1995 <justinyeh1995@gmail.com>
Member
Future-Outlier
left a comment
There was a problem hiding this comment.
- we should make sure this only be used when k8s version >= 1.34
- we should also have some mechanism to check user open the alpha feature via feature gate.
Contributor
Author
Appreciate the concrete suggestions. I am wondering whether we should keep the current fix (checking dashboard before applying timeout) as a fallback for users with k8s version < 1.34. Or should we simply focus on solving it for k8s version >= 1.34. My judgement is these two can co-exist. |
Contributor
Author
|
After discussing offline with @Future-Outlier, this pr will instead focus on implementing restarting submitter for k8s version 1.34+. |
…er-container restart Signed-off-by: justinyeh1995 <justinyeh1995@gmail.com>
…test Signed-off-by: justinyeh1995 <justinyeh1995@gmail.com>
…rt feature gate is enabled at operator startup Signed-off-by: justinyeh1995 <justinyeh1995@gmail.com>
justinyeh1995
commented
Jan 31, 2026
Comment on lines
+629
to
+630
| Operator: corev1.ContainerRestartRuleOnExitCodesOpNotIn, | ||
| Values: []int32{0}, |
Contributor
Author
There was a problem hiding this comment.
is it ok if we restart on any non-zero error code?
Signed-off-by: justinyeh1995 <justinyeh1995@gmail.com>
Signed-off-by: justinyeh1995 <justinyeh1995@gmail.com>
…idecarmode-terminal-condition
Signed-off-by: justinyeh1995 <justinyeh1995@gmail.com>
Signed-off-by: justinyeh1995 <justinyeh1995@gmail.com>
4 tasks
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
The submitter sidecar may exit during transient head‑node spikes.
The fix has two layers:
f
SidecarSubmitterRestartis enabled on a cluster with K8s < 1.34, the operator will fail fast at startup.Related issue number
Closes #4285
Testing
Level 1: kind v1.26 (less than 1.34) / no feature gate enabled
kubectl get rayjob rayjob-sidecar-mode -o jsonpath='{.status.jobDeploymentStatus}'Screen.Recording.2026-02-04.at.9.16.01.PM.-.Compressed.with.FlexClip.mp4
kind v1.26 (less than 1.34) / feature gate enabled
kind v.134+ / feature gate enabled
ContainerRestartRulesenabled, v1.35 enable it by defaultapply the same manifest pasted above
record the job id
kubectl get rayjob rayjob-sidecar-mode -o jsonpath='{.status.jobDeploymentStatus}'Checks